package com.wondream.myframework.app.common.exception;

import lombok.Data;

/**
 * 通用异常类
 */
@Data
public class ResponseCodeException extends RuntimeException {

    public static String ERROR_UNKONN = "900101";
    public static String ERROR_SYSTEM_BUSY = "900102";
    public static String ERROR_VALIDATE_FAIL = "900103";
    public static String ERROR_REQUEST_TIMEOUT = "900104";
    public static String ERROR_SECURITY_CHECK_FAIL = "900104";

    public static String ERROR_CONNECT_FAIL = "900106";
    public static String ERROR_REMOTE_EXCEPTION = "900107";
    public static String ERROR_NOT_LOGINED = "900108";
    public static String ERROR_ESA_NOT_EXISTS = "900900";
    public static String ERROR_SAR_CONFIG_ERROR = "900200";
    public static String ERROR_APP_CONFIG_ERROR = "900201";

    private String responseCode;
    private String responseMsg;
    private Object[] args;

    public ResponseCodeException(String responseCode, String responseMsg) {
        this.responseCode = responseCode;
        this.responseMsg = responseMsg;
    }

    public ResponseCodeException(String responseCode, String responseMsg, Throwable cause) {
        super(cause);
        this.responseCode = responseCode;
        this.responseMsg = responseMsg;
    }

}
